package com.gm.baseplatform.base.bootstrap;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.gm.baseplatform.base.cfg.IConfiguration;
import com.gm.baseplatform.core.utils.ApplicationContextUtil;

public class ConfigurationBoot implements Boot.BootFlag {

	private Log log = LogFactory.getLog(ModuleBoot.class); 
	
	public void boot(Boot boot) throws BootException {
		
		log.info("ConfigurationBoot...");
		
		IConfiguration configuration = 
			(IConfiguration)ApplicationContextUtil.getBean("configuration");
		
		if (configuration.isInit()) {
			log.info("configuration is already...");
			return;
		}
		
		configuration.init();
	}

	public String getBootRoot() {
		return Boot.BOOT_ROOT_SPRING;
	}

}
